/*
* @Author: fredlee
* @Date:   2017-04-18 14:31:17
* @Last Modified by:   fredlee
* @Last Modified time: 2017-08-25 10:47:17
*/
//首页-我要卖 组件 头部 无路由页面
const Header = resolve => {
    require.ensure(['components/Header.vue'], () => {
        resolve(require('components/Header.vue'));
    }, 'Home');
};
// //首页-我要卖 父组件 无实际显示路由页面
const Seller = resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/Seller.vue'));
    }, 'seller');
}
//首页-我要卖页面
const SellerHome = resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/SellerHome.vue'));
    }, 'seller');
}
//我要卖 账号发布页面
const GoodsPublish= resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/goodsPublish/GoodsPublish.vue'));
    }, 'seller');
}
//我要卖 商品发布第二步页面
const GoodsCreated= resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/goodsCreated/GoodsCreated.vue'));
    }, 'seller');
}
//我要卖 商品发布第二步页面
const GoodsCreatedMobile= resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/goodsCreated/GoodsCreatedMobile.vue'));
    }, 'seller');
}
//首页 我要卖游戏币发布页面
const CreatedGold= resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/goodsCreated/CreatedGold.vue'));
    }, 'seller');
}
// //首页我要卖-区服页面 未实际用到 弃用（未找到用到的地方）
// const SelectServer= resolve => {
//     require.ensure([], () => {
//         resolve(require('components/seller/goodsCreated/SelectServer.vue'));
//     }, 'seller');
// }
//我要卖 商品发布成功页面
const PublishSuccess = resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/goodsPublish/PublishSuccess.vue'));
    }, 'seller');

}
//我要卖 商品发布 交易流程页面
const PublishProcess = resolve => {
    require.ensure([], () => {
        resolve(require('components/seller/goodsPublish/PublishProcess.vue'));
    }, 'seller');
}
const SellHome = r => require.ensure([], () => r(require('components/mobileGame/sell/home.vue')), 'sellHome');
export const sellerHomeRoute ={
    path: '/vue/seller',
    components: {
        default: Seller,
    },
    children: [{
    path: '/vue/sell-home/:type',
    name: 'MGSellHome',
    components: {default:SellHome, 'seller-header': Header},
    meta: {isPublish: true, requireAuth: false}
}]}
export const sellerRoute =

{
    path: '/vue/seller',
    components: {
        default: Seller,
    },
    children: [
     
        {
            path: 'goodsPublish',
            name:'goodsPublish',
            components: {
                default: GoodsPublish,
                 'seller-header': Header,
            }
        },
         {
            path: 'goodsCreated',
            name:'goodsCreated',
            components: {
                default: GoodsCreated,
                'seller-header': Header,
            }
        },
        // {
        //     path: 'selectServer',
        //     name:'selectServer',
        //     components: {
        //         default: SelectServer,
        //     }
        // },
        {
            path: 'PublishSuccess',
            name:'PublishSuccess',
            components: {
                default: PublishSuccess,
                'seller-header': Header,
            }
        },
        {
            path: 'PublishProcess',
            name:'PublishProcess',
            components: {
                default: PublishProcess,
                //'seller-header': Header,
            }
        },
        {
            path: 'GoodsCreatedMobile',
            name:'GoodsCreatedMobile',
            components: {
                default: GoodsCreatedMobile,
                'seller-header': Header,
            }
        },
        {
            path: 'CreatedGold',
            name:'CreatedGold',
            components: {
                default: CreatedGold,
                'seller-header': Header,
            }
        },


    ],
    meta: {isPublish: true, requireAuth: true}
};
